//
//  WJKit.h
//

#import <UIKit/UIKit.h>
#import "WJSimpleNetwork.h"
#import "NSDictionary+MutableDeepCopy.h"

//! Project version number for WJKit.
FOUNDATION_EXPORT double WJKitVersionNumber;

//! Project version string for WJKit.
FOUNDATION_EXPORT const unsigned char WJKitVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <WJKit/PublicHeader.h>


//-----------------------------
// 常见宏定义
//-----------------------------
// 1.分辨率相关
#define SCREEN_WIDTH           ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT          ([UIScreen mainScreen].bounds.size.height)
#define SCREEN_WIDTH_VERTICAL  MIN(SCREEN_WIDTH,SCREEN_HEIGHT)
#define SCREEN_HEIGHT_VERTICAL MAX(SCREEN_WIDTH,SCREEN_HEIGHT)
#define SCREEN_PIEX_WIDTH      (1./[UIScreen mainScreen].scale)

#define kDevice_Is_iPhoneX  ([UIScreen mainScreen].bounds.size.height ==  812.0f \
|| [UIScreen mainScreen].bounds.size.height ==  896.0f )

// 2.颜色相关
#define RGBCOLOR(r,g,b)     [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \
alpha:1]
#define RGBACOLOR(r,g,b,a)  [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \
alpha:(a)]
#define CGRGBCOLOR(r,g,b)   [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \
alpha:1].CGColor
#define HEXCOLOR(hex)       [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 \
green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:1]
#define HEXCOLORA(hex,p)    [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 \
green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:p]
#define RGBCOLOR(r,g,b)     [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
#define RGBACOLOR(r,g,b,a)  [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \
alpha:(a)]

// 3.代码函数
#define OBJ2STR(a)      (nil==a||NULL == a)?@"":[a isKindOfClass:NSClassFromString(@"NSNumber")]?[a stringValue]:[a isKindOfClass:NSClassFromString(@"NSString")]?a:[a isKindOfClass:NSClassFromString(@"NSNull")]?@"":a


//-----------------------------
// 开发注意点
// 1.info.plist里面各项权限的申明
// 2.使用相机前判断权限
//-----------------------------


